/*
 * DSMComun.h
 *
 *  Created on: Dec 15, 2013
 *      Author: m
 */

#ifndef DSMCOMUN_H_
#define DSMCOMUN_H_

#include <cstdlib>
#include <cstring>
#include <unistd.h>

#define DSM_IPC_BASEFILE   "DSM.ipc"
#define SHM_TEST           0
#define COLA_PEDIDO_HOST   1
#define COLA_ENTREGA_HOST  2
#define COLA_LIBERAR_HOST  3
#define COLA_PEDIDO_TOKEN  4
#define COLA_ENTREGA_TOKEN 5
#define COLA_LIBERAR_TOKEN 6
#define SHM_CONT_PEDIDOS   7
#define MTX_CONT_PEDIDOS   8
#define COLA_REQUEST_CREACION 9
#define COLA_REPLY_CREACION   10
#define SEQ_DSM_ID_CANAL      11

#define COLA_PEDIDO_BROKER_BASENAME  "dsmpedido."
#define COLA_LIBERAR_BROKER_BASENAME "dsmliberar."
#define DSM_MAXSIZE                  1024


// UUID de las DSM
#define DSMID_TEST     1
#define DSMID_CINTA13A 2
#define DSMID_CINTA13B 3
#define DSMID_CINTA15  4
#define DSMID_R11APROD 5
#define DSMID_R11BPROD 6
#define DSMID_R14CONS  7
#define DSMID_R14PROD  8
#define DSMID_R16CONS  9

struct PedidoCreacionCanalDSM
{
    int id;
    char nombre[256];
};

struct ContadorDistribuido
{
    int valor;
};

struct PedidoDSM
{
    int idDSM;
    char colaRespuesta[256];
};

struct TokenDSM
{
    int version;
    int idDSM;
    char data[DSM_MAXSIZE];
};

#endif /* DSMCOMUN_H_ */
